from launch import LaunchDescription
from launch_ros.actions import LifecycleNode, Node
from ament_index_python.packages import get_package_share_directory
import os


def generate_launch_description():

    config = os.path.join(
        get_package_share_directory('mqtt_cloud_sub'),
        'config',
        'cloud_subscriber.yaml'
    )

    return LaunchDescription([
        LifecycleNode(
            package='mqtt_cloud_sub',
            executable='cloud_subscriber',
            name='pointcloud_mqtt_subscriber',
            namespace='',
            output='screen',
            parameters=[config]
        )
    ])